Alternation
A regular expression can contain a list of subexpressions, anyone of which might match the target. The list of subexpressions is delimited by "|"
Example
"First|1st|Winner" will match "First" or "1st" or "Winner".Since regular expressions are greedy (ie they match the longest possible first match), the alternation metacharacter operates on the largest possible surrounding regular expression.
More technically, the alternational metacharacter has the lowest precedence of any regular expression operator.
Example
"this and|or that" will match "this and" or "or that".To limit alternation, grouping brackets can be used.
Example
"this (and|or) that" will match "this and that" or "this or that" against the target string.